<?
class Shop_Game_Form_Login extends Zend_Form
{
  function __construct($opts = null)
  {
    parent::__construct($opts);
    $this->setName('login');

    $this->addDecorator('Description', array('placement' => 'prepend'));

    $username = $this->createElement('text', 'name', array('label' => 'ไอดี'));
    $username->addValidator(new Zend_Validate_Alnum());
    $username->setRequired(true);

    $password = $this->createElement('password', 'password', array('label' => 'รหัสผ่าน'));
    $password->addValidator('StringLength', false, array(6))
             ->setRequired(true);

    $this->addElement($username);
    $this->addElement($password);
    $this->addElement('submit', '_submit', array('label' => 'Login'));
  }
}
